package com.zh.kotlin_mvvm.view

import android.content.Context
import android.util.AttributeSet
import android.view.MotionEvent
import android.view.View
import android.widget.FrameLayout
import com.blankj.utilcode.util.LogUtils

class TestView @JvmOverloads constructor(
    context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0
) : FrameLayout(context, attrs, defStyleAttr) {

    override fun dispatchTouchEvent(event: MotionEvent?): Boolean {
        LogUtils.e("dispatchTouchEvent-------")
        return super.dispatchTouchEvent(event)
    }

    override fun onInterceptTouchEvent(ev: MotionEvent?): Boolean {
        LogUtils.e("onInterceptTouchEvent-------")
        return false
    }

    override fun onTouchEvent(event: MotionEvent?): Boolean {
        LogUtils.e("onTouchEvent--------")
        return super.onTouchEvent(event)
    }
}